package kr.saeildamil.androidStudy_second.draw;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class BlurFilter extends Activity {

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(new MyView(this));
	}

	protected class MyView extends View {

		public MyView(Context context) {
			super(context);
		}

		public void onDraw(Canvas canvas) {
			canvas.drawColor(Color.LTGRAY);
			Paint paint = new Paint();
			paint.setAntiAlias(true);

			paint.setColor(Color.RED);
			canvas.translate(0, 400);
			canvas.drawRect(10, 10, 100, 100, paint);

			canvas.skew(-0.1f, 0);
			canvas.translate(120, 0);
			canvas.drawRect(10, 10, 100, 100, paint);

			canvas.skew(-0.1f, 0);
			canvas.translate(120, 0);
			canvas.drawRect(10, 10, 100, 100, paint);

			canvas.skew(-0.1f, 0);
			canvas.translate(120, 0);
			canvas.drawRect(10, 10, 100, 100, paint);
			
			canvas.skew(-0.1f, 0);
			canvas.translate(120, 0);
			canvas.drawRect(10, 10, 100, 100, paint);
			
			canvas.skew(-0.1f, 0);
			canvas.translate(120, 0);
			canvas.drawRect(10, 10, 100, 100, paint);

		}
	}
}
